package com.javautil;

import java.util.Calendar;

public class pingnianAndrunnian {
    public static void main(String[] args) {
        Calendar calendar = Calendar.getInstance();
        // 获取当前时间
        int year = 2022;
        calendar.set(year,2,1);
        calendar.add(Calendar.DAY_OF_MONTH,-1);
        int i = calendar.get(Calendar.DAY_OF_MONTH);
        if (i == 29) {
            System.out.println("闰年");
        }else {
            System.out.println("平年");
        }

    }
}
